<?php

error_reporting(~E_WARNING);

$hostName = 'localhost';
$userName = 'root';
$password = '';

mysql_connect($hostName,$userName,$password) or die(mysql_error()." <br>Unable to connnect MYSQL");

mysql_select_db('b19')or die(mysql_error()." <br>Unable to Select DATABASE");

 $insertQuery =
 "INSERT INTO `practice` SET
 `name`='Rasmus Lerdorf',
 `email`='rasmusLerd@gmail.com',
 `password`='12345abcd',
 `added_date`=NOW(),
 `status`='1'";


echo $insertQuery,"<br>";

mysql_query($insertQuery)or die(mysql_error()." <br>Unable to INSERT DATA");

// How to select LAst inserted KEY
echo "<br>last Insert Id is :".mysql_insert_id();

// How to know number of rows affected
echo "<br>Affected Rows :".mysql_affected_rows();


















































